<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <meta name="robots" content="noarchive">
  <title class="f_title"></title>
  <link rel="stylesheet" href="./static/css/style.css?v=6">
  <link rel="stylesheet" href="./static/css/semantic.min.css">
  <link rel="stylesheet" href="./static/css/codemirror.min.css" />
  <link rel="stylesheet" href="./static/css/darcula.min.css" />
  <script src="./static/js/codemirror.min.js"></script>
  <script src="./static/js/haxe.min.js"></script>
  <script src="./static/js/jquery.min.js"></script>
  <script src="./static/js/semantic.min.js"></script>
  <script src="./static/js/marked.min.js"></script>
  <script src="./static/js/diff.min.js"></script>
  <script src="./static/js/coder.js?v=80"></script>
  <script src="./static/js/tenant.js?v=80"></script>
  <script src="./static/js/setting.js?v=80"></script>
</head>

<body>
  <div class="ui borderless main menu margin-top-0">
    <div class="ui text container ai-textcontainer">
      <a href="/" class="header item" style="padding-left: 0px;">
        <img class="logo" src="./static/image/logo.png" style="margin-right: 5px;">
        <span class="f_title"></span>
      </a>
      <a class="item" href="task.html"><span class="f_start_task"></span></a>
      <a class="item" href="requirement.html"><span class="f_requirement_list"></span></a>
      <a class="item" href="app.html"><span class="f_app_list"></span></a>
      <a class="ui right floated item" onClick="openUrl('tenant.html')"><i class="university icon teal"></i><span id="current-tenant"></span></a>
      <a href="#" class="ui right floated dropdown item" style="margin-left: 0px !important">
        <span class="f_more_operations"></span> <i class="dropdown icon"></i>
        <div class="menu">
          <div class="item"><i class="user icon tiny"></i><span class="f_hello"></span> <span id="current-username"></span></div>
          <div class="item" onClick="changeLanguage()"><i class="exchange icon tiny"></i><span class="f_change_language"></span></div>
          <div class="item" onClick="openUrlNew('https://vvx03gck2p.feishu.cn/docx/KwnSdasq1oK3LMxfVBAcwhG2neQ')"><i class="question circle icon tiny"></i><span class="f_help"></span></div>
          <div class="item" onClick="logout()"><i class="sign-out icon tiny"></i><span class="f_logout"></span></div>
        </div>
      </a>
    </div>
  </div>

  <!--div class="ui container">
    <h4 class="ui header">LLM</h4>
    <table class="ui celled structured table">
      <thead>
        <tr>
          <th>LLM</th>
          <th>LLM URL</th>
          <th>API version</th>
          <th>Proxy</th>
          <th>API Key</th>
        </tr>
      </thead>
      <tbody id="llm_config_list">
      </tbody>
    </table>
  </div-->

  <div class="ui container">
    <a href="tenant.html" class="ui linkedin button" id="add-application">
      <i class="angle double left icon"></i>
      <span class="f_back_to_list"></span>
    </a>
    <div class="ui button"><i class="university icon teal"></i><span id="current_tenant"></span></div>
  </div>

  <div class="ui container">
    <div>
      <h4 class="ui header floated left">
        Git
      </h4>
      <i class="blue plus icon link floated right float-right large" onClick="addGitConfig()"></i>
    </div>
    <table class="ui celled structured table">
      <thead>
        <tr>
          <th>Name</th>
          <th>Git</th>
          <th>Git URL</th>
          <th>Token</th>
          <th>Username</th>
          <th>Email</th>
        </tr>
      </thead>
      <tbody id="git_config_list">
      </tbody>
    </table>
  </div>

  <div class="ui container">
    <div>
      <h4 class="ui header floated left">
        CI
      </h4>
      <i class="blue plus icon link floated right float-right large" onClick="addCIConfig()"></i>
    </div>
    <table class="ui celled structured table">
      <thead>
        <tr>
          <th>Name</th>
          <th>CI</th>
          <th>CI URL</th>
          <th>Token</th>
        </tr>
      </thead>
      <tbody id="ci_config_list">
      </tbody>
    </table>
  </div>

  <div class="ui container">
    <div>
      <h4 class="ui header floated left">
        CD
      </h4>
      <i class="blue plus icon link floated right float-right large" onClick="addCDConfig()"></i>
    </div>
    <table class="ui celled structured table">
      <thead>
        <tr>
          <th>Name</th>
          <th>CD</th>
          <th>CD ACCESS KEY</th>
          <th>CD SECRET KEY</th>
        </tr>
      </thead>
      <tbody id="cd_config_list">
      </tbody>
    </table>
  </div>

  <div class="ui modal" id="model-edit">
    <div class="content">
      <div class="ui form">
        <div class="field">
          <label><span class="f_edit"></span></label>
          <textarea id="mode-edit-content" rows="35"></textarea>
          <input type="hidden" id="mode-edit-app-name">
        </div>
      </div>
    </div>
    <div class="actions">
      <div class="ui green button" id="mode-edit-content-save"><span class="f_submit"></span></div>
      <div class="ui button" id="mode-edit-content-cancel"><span class="f_cancel"></span></div>
    </div>
  </div>

  <div class="ui modal" id="git-edit">
    <div class="content">
      <div class="ui form">
        <div class="field">
          <label><span class="f_config_name"></span></label>
          <input type="text" id="git_name">
        </div>
        <div class="field">
          <label><span class="f_git_provider"></span></label>
          <select class="ui fluid dropdown" id="git_provider">
            <option value="">Select git provider</option>
            <option value="GitHub">GitHub</option>
            <option value="GitLab">GitLab</option>
            <option value="Gitee">Gitee</option>
            <option value="Coding">Coding</option>
            <option value="Others">Others</option>
          </select>
        </div>
        <div class="field">
          <label><span class="f_git_url"></span></label>
          <input type="hidden" id="git_config_id">
          <input type="text" id="git_url">
        </div>
        <div class="field">
          <label><span class="f_git_token"></span></label>
          <input type="text" id="git_token">
        </div>
        <div class="field">
          <label><span class="f_git_username"></span></label>
          <input type="text" id="git_username">
        </div>
        <div class="field">
          <label><span class="f_git_email"></span></label>
          <input type="text" id="git_email">
        </div>
        <div class="field"></div>
    </div>
    <div class="actions">
      <div class="ui green button" onClick="editGit()"><span class="f_submit"></span></div>
      <div class="ui button" onClick="hideModal('git-edit')"><span class="f_cancel"></span></div>
    </div>
  </div>

  <div class="ui modal" id="ci-edit">
    <div class="content">
      <div class="ui form">
        <div class="field">
          <label><span class="f_config_name"></span></label>
          <input type="text" id="ci_name">
        </div>
        <div class="field">
          <label><span class="f_ci_provider"></span></label>
          <select class="ui fluid dropdown" id="ci_provider">
            <option value="">Select CI provider</option>
            <option value="GitHub">GitHub</option>
            <option value="GitLab">GitLab</option>
            <option value="Gitee">Gitee</option>
            <option value="Coding">Coding</option>
            <option value="Others">Others</option>
          </select>
        </div>
        <div class="field">
          <label><span class="f_ci_api_url"></span></label>
          <input type="hidden" id="ci_config_id">
          <input type="text" id="ci_api_url">
        </div>
        <div class="field">
          <label><span class="f_ci_token"></span></label>
          <input type="text" id="ci_token">
        </div>
        <div class="field"></div>
    </div>
    <div class="actions">
      <div class="ui green button" onClick="editCI()"><span class="f_submit"></span></div>
      <div class="ui button" onClick="hideModal('ci-edit')"><span class="f_cancel"></span></div>
    </div>
  </div>

  <div class="ui modal" id="cd-edit">
    <div class="content">
      <div class="ui form">
        <div class="field">
          <label><span class="f_config_name"></span></label>
          <input type="text" id="cd_name">
        </div>
        <div class="field">
          <label><span class="f_cd_provider"></span></label>
          <select class="ui fluid dropdown" id="cd_provider">
            <option value="">Select CD provider</option>
            <option value="Aliyun">Aliyun</option>
            <option value="Others">Others</option>
          </select>
        </div>
        <div class="field">
          <label><span class="f_ACCESS_KEY"></span></label>
          <input type="hidden" id="cd_config_id">
          <input type="text" id="ACCESS_KEY">
        </div>
        <div class="field">
          <label><span class="f_SECRET_KEY"></span></label>
          <input type="text" id="SECRET_KEY">
        </div>
        <div class="field"></div>
    </div>
    <div class="actions">
      <div class="ui green button" onClick="editCD()"><span class="f_submit"></span></div>
      <div class="ui button" onClick="hideModal('cd-edit')"><span class="f_cancel"></span></div>
    </div>
  </div>

  <div class="ui modal" id="my-alert">
    <div class="header" id="my-alert-title"></div>
    <div class="content" id="my-alert-content">
    </div>
  </div>
  <div class="ui watermark">
    <span id="watermark-username"></span> @ <span class="f_title"></span></div>
  </div>
</body>
</html>
